home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global mySprite, snapH, snapV, CastName, exitRequest
- set mySprite to the clickOn
- set startH to the locH of sprite mySprite
- set startV to the locV of sprite mySprite
- set CastName to the name of cast the castNum of sprite mySprite
- set snapped to dragItem(snapH, snapV, 0, 1)
- if not snapped then
- if not (sprite mySprite intersects 5) then
- set NewsnapH to 1
- else
- set NewsnapH to 0
- end if
- if NewsnapH = 0 then
- set the locH of sprite mySprite to startH
- set the locV of sprite mySprite to startV
- updateStage()
- else
- snapTo(mySprite, snapH, snapV)
- set snapped to 1
- end if
- end if
- if snapped then
- if CastName = exitRequest then
- set temp to getOne(wagonList, exitRequest)
- deleteAt(wagonList, temp)
- set temp to getOne(requestLocs, exitRequest)
- setAt(requestLocs, temp, EMPTY)
- puppetSprite(7, 0)
- puppetSprite(8, 0)
- puppetSprite(9, 0)
- puppetSprite(13, 0)
- puppetSprite(14, 0)
- go("Right")
- else
- Talk("Wrong")
- wait(10)
- Talk("i need")
- Talk("S" & exitRequest)
- set the locH of sprite mySprite to startH
- set the locV of sprite mySprite to startV
- updateStage()
- end if
- end if
- end
-